<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>动态绑定 class 对象数组语法</title>
    <style>
        .textdecorated {
            text-decoration: underline;
        }

        .colordecorated {
            color: red;
        }
    </style>
</head>
<body>
<div id="app">
    <h1 v-bind:class="abc">Hello, World!</h1>
    <h1 v-bind:class="[abc]">Hello, World!</h1>
    <h1 v-bind:class="[style1, style2]">Hello, World!</h1>
</div>

<script type="module">

    import {createApp, reactive} from "../../../../../js/vue.esm-browser.js";

    const app = createApp({
        setup() {
            let abc = reactive({
                colordecorated: true,
                textdecorated: true
            })

            let style1 = reactive({
                colordecorated: true,
            })


            let style2 = reactive({
                textdecorated: true
            })


            return {
                abc,
                style1,
                style2,
            }
        }
    })

    app.mount("#app")
</script>
</body>
</html>